import 'package:flutter/material.dart';
import 'package:dio/dio.dart';
import 'package:fantuike_app/api/Api.dart' show Api;

class PersonDetail extends StatefulWidget {
  @override
  _PersonDetailState createState() => _PersonDetailState();
}

class _PersonDetailState extends State<PersonDetail> {
  PreferredSize BuildAppBarWidget() {
    return PreferredSize(
        child: AppBar(
          leading: IconButton(
              icon: Icon(
                Icons.chevron_left,
                size: 30.0,
                color: Color(0xffffffff),
              ),
              onPressed: () {
                Navigator.pop(context);
              }),
          backgroundColor: Color(0xffE0544B),
          title: Text(
            "个人资料",
            style: TextStyle(
                color: Color(
                  0xffffffff,
                ),
                fontSize: 18.0),
          ),
          centerTitle: true,
          elevation: 0.0,
        ),
        preferredSize:
            Size.fromHeight(MediaQuery.of(context).size.height * 0.065));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: BuildAppBarWidget(),
      body: Row(
        children: <Widget>[BuildAccountInfoWidget()],
      ),
    );
  }
}

class BuildAccountInfoWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      child: Container(
        padding: const EdgeInsets.only(left: 5.0, right: 5.0),
        color: Color(0xffffffff),
        child: Column(
          children: <Widget>[
            Container(
              color: Color(0xfff4f4f4),
              alignment: Alignment.centerLeft,
              margin:
                  const EdgeInsets.only(top: 10.0, left: 10.0, bottom: 10.0),
              child: Text("账户信息",
                  style: TextStyle(
                      fontSize: 18.0,
                      fontWeight: FontWeight.w500,
                      color: Color(0xff9F9F9F))),
            )
          ],
        ),
      ),
    );
  }
}
